var __extends =
    (this && this.__extends) ||
    (function () {
      var t = function (e, a) {
        return (t =
          Object.setPrototypeOf ||
          ({ __proto__: [] } instanceof Array &&
            function (t, e) {
              t.__proto__ = e;
            }) ||
          function (t, e) {
            for (var a in e)
              Object.prototype.hasOwnProperty.call(e, a) && (t[a] = e[a]);
          })(e, a);
      };
      return function (e, a) {
        function c() {
          this.constructor = e;
        }
        if ("function" != typeof a && null !== a)
          throw new TypeError(
            "Class extends value " + String(a) + " is not a constructor or null"
          );
        t(e, a),
          (e.prototype =
            null === a
              ? Object.create(a)
              : ((c.prototype = a.prototype), new c()));
      };
    })(),
  ChatFaceDialog = (function (t) {
    function e() {
      var e = t.call(this) || this;
      e.faceArray = [];
      for (var a = 1; a < 17; a++)
        e.faceArray.push({ url: "emoji/[cd" + a + "].png" });
      return (
        (e.list_chatFace1.dataSource = e.faceArray),
        (e.list_chatFace1.renderHandler = new Handler(e, e.onRender)),
        (e.list_chatFace1.vScrollBarSkin = ""),
        (e.list_chatFace1.selectEnable = !0),
        (e.list_chatFace1.scrollBar.elasticBackTime = 100),
        (e.list_chatFace1.scrollBar.elasticDistance = 200),
        e
      );
    }
    return (
      __extends(e, t),
      (e.showChatFaceView = function (t) {
        return (
          null == this.chatFaceV &&
            ((this.chatFaceV = new e()), (this.chatFaceV.zOrder = 1900)),
          (this.chatFaceV.top = "chatroom" == t ? 367 : 260),
          console.log(this.chatFaceV.top),
          this.chatFaceV.popup(!1),
          (this.chatFaceV.type = t),
          this.chatFaceV
        );
      }),
      (e.prototype.onRender = function (t, e) {
        var a = t.getChildAt(0);
        (a.skin = this.faceArray[e].url),
          a.on(Laya.Event.CLICK, this, this.onFaceClick, [e]);
      }),
      (e.prototype.onFaceClick = function (t) {
        var e = "@cd0" + (t + 1) + "@";
        "chatroom" == this.type
          ? Laya.stage.event("faceType", { text: e })
          : "privateChat" == this.type &&
            Laya.stage.event("faceType_private_chat", { text: e });
      }),
      e
    );
  })(ui.MessageController.ChatFaceDialogUI);
